package ua.org.mtgatherer.entities;

import com.google.appengine.api.datastore.Key;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 *
 * @author esed
 */
@PersistenceCapable
public class DeckCard
{
   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Key id;
   
   @Persistent
   private String cardTitle;   
   
   @Persistent
   private Short amount;
   
   @Persistent
   private CardPlace cardPlace;

   public DeckCard(Short amount, String cardTitle, CardPlace cardPlace)
   {
      this.cardTitle = cardTitle;
      this.amount = amount;
      this.cardPlace = cardPlace;
   }

   public Short getAmount()
   {
      return amount;
   }

   public void setAmount(Short amount)
   {
      this.amount = amount;
   }

   public String getCardTitle()
   {
      return cardTitle;
   }

   public void setCardTitle(String cardTitle)
   {
      this.cardTitle = cardTitle;
   }

   public CardPlace getCardPlace() {
      return cardPlace;
   }

   public void setCardPlace(CardPlace cardPlace) {
      this.cardPlace = cardPlace;
   }

   @Override
   public String toString()
   {
      return amount + " " + cardTitle + "\n";
   }
   
   
}
